#pragma once
#include "stdafx.h"
#include "ui_oil_model_editor.h"
#include "common.h"

class OilModel;

class OilModelEitor : public QDialog
{
	Q_OBJECT
private:
	Ui::OilModelEitorDialog ui;
	QWeakPointer<Common> common;
	void setModel(QSharedPointer<ParametersModel> _model);
	vector<QSharedPointer<OilModel>> oilModelList;
public:
	OilModelEitor(QWeakPointer<Common> _common);	
	~OilModelEitor();
	void setData(vector<QSharedPointer<OilModel>> _oilModelList, int _index);
	vector<QSharedPointer<OilModel>> getData();
	int getIndex();
private slots:
	void on_bAdd_clicked();
	void on_bRemove_clicked();
	void on_bUse_clicked();
	void displayOilModel(int index);
};

